\(\int \csc (a+b x) \sec ^3(a+b x) \, dx\) [128]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 15, antiderivative size = 27 \[ \int \csc (a+b x) \sec ^3(a+b x) \, dx=\frac {\log (\tan (a+b x))}{b}+\frac {\tan ^2(a+b x)}{2 b} \]

[Out]

ln(tan(b*x+a))/b+1/2*tan(b*x+a)^2/b

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {2700, 14} \[ \int \csc (a+b x) \sec ^3(a+b x) \, dx=\frac {\tan ^2(a+b x)}{2 b}+\frac {\log (\tan (a+b x))}{b} \]

[In]

Int[Csc[a + b*x]*Sec[a + b*x]^3,x]

[Out]

Log[Tan[a + b*x]]/b + Tan[a + b*x]^2/(2*b)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2700

Int[csc[(e_.) + (f_.)*(x_)]^(m_.)*sec[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(1 + x^2)^((
m + n)/2 - 1)/x^m, x], x, Tan[e + f*x]], x] /; FreeQ[{e, f}, x] && IntegersQ[m, n, (m + n)/2]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {1+x^2}{x} \, dx,x,\tan (a+b x)\right )}{b} \\ & = \frac {\text {Subst}\left (\int \left (\frac {1}{x}+x\right ) \, dx,x,\tan (a+b x)\right )}{b} \\ & = \frac {\log (\tan (a+b x))}{b}+\frac {\tan ^2(a+b x)}{2 b} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.44 \[ \int \csc (a+b x) \sec ^3(a+b x) \, dx=-\frac {\log (\cos (a+b x))}{b}+\frac {\log (\sin (a+b x))}{b}+\frac {\sec ^2(a+b x)}{2 b} \]

[In]

Integrate[Csc[a + b*x]*Sec[a + b*x]^3,x]

[Out]

-(Log[Cos[a + b*x]]/b) + Log[Sin[a + b*x]]/b + Sec[a + b*x]^2/(2*b)

Maple [A] (verified)

Time = 0.16 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.85

method result size
derivativedivides \(\frac {\frac {1}{2 \cos \left (b x +a \right )^{2}}+\ln \left (\tan \left (b x +a \right )\right )}{b}\) \(23\)
default \(\frac {\frac {1}{2 \cos \left (b x +a \right )^{2}}+\ln \left (\tan \left (b x +a \right )\right )}{b}\) \(23\)
risch \(\frac {2 \,{\mathrm e}^{2 i \left (b x +a \right )}}{b \left ({\mathrm e}^{2 i \left (b x +a \right )}+1\right )^{2}}+\frac {\ln \left ({\mathrm e}^{2 i \left (b x +a \right )}-1\right )}{b}-\frac {\ln \left ({\mathrm e}^{2 i \left (b x +a \right )}+1\right )}{b}\) \(62\)
norman \(\frac {2 \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{b \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )-1\right )^{2}}+\frac {\ln \left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{b}-\frac {\ln \left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )-1\right )}{b}-\frac {\ln \left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )+1\right )}{b}\) \(81\)
parallelrisch \(\frac {\left (-2 \cos \left (2 b x +2 a \right )-2\right ) \ln \left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )-1\right )+\left (-2 \cos \left (2 b x +2 a \right )-2\right ) \ln \left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )+1\right )+\left (2 \cos \left (2 b x +2 a \right )+2\right ) \ln \left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )\right )-\cos \left (2 b x +2 a \right )+1}{2 b \left (1+\cos \left (2 b x +2 a \right )\right )}\) \(108\)

[In]

int(sec(b*x+a)^3/sin(b*x+a),x,method=_RETURNVERBOSE)

[Out]

1/b*(1/2/cos(b*x+a)^2+ln(tan(b*x+a)))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 56 vs. \(2 (25) = 50\).

Time = 0.30 (sec) , antiderivative size = 56, normalized size of antiderivative = 2.07 \[ \int \csc (a+b x) \sec ^3(a+b x) \, dx=-\frac {\cos \left (b x + a\right )^{2} \log \left (\cos \left (b x + a\right )^{2}\right ) - \cos \left (b x + a\right )^{2} \log \left (-\frac {1}{4} \, \cos \left (b x + a\right )^{2} + \frac {1}{4}\right ) - 1}{2 \, b \cos \left (b x + a\right )^{2}} \]

[In]

integrate(sec(b*x+a)^3/sin(b*x+a),x, algorithm="fricas")

[Out]

-1/2*(cos(b*x + a)^2*log(cos(b*x + a)^2) - cos(b*x + a)^2*log(-1/4*cos(b*x + a)^2 + 1/4) - 1)/(b*cos(b*x + a)^
2)

Sympy [F]

\[ \int \csc (a+b x) \sec ^3(a+b x) \, dx=\int \frac {\sec ^{3}{\left (a + b x \right )}}{\sin {\left (a + b x \right )}}\, dx \]

[In]

integrate(sec(b*x+a)**3/sin(b*x+a),x)

[Out]

Integral(sec(a + b*x)**3/sin(a + b*x), x)

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.48 \[ \int \csc (a+b x) \sec ^3(a+b x) \, dx=-\frac {\frac {1}{\sin \left (b x + a\right )^{2} - 1} + \log \left (\sin \left (b x + a\right )^{2} - 1\right ) - \log \left (\sin \left (b x + a\right )^{2}\right )}{2 \, b} \]

[In]

integrate(sec(b*x+a)^3/sin(b*x+a),x, algorithm="maxima")

[Out]

-1/2*(1/(sin(b*x + a)^2 - 1) + log(sin(b*x + a)^2 - 1) - log(sin(b*x + a)^2))/b

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 124 vs. \(2 (25) = 50\).

Time = 0.32 (sec) , antiderivative size = 124, normalized size of antiderivative = 4.59 \[ \int \csc (a+b x) \sec ^3(a+b x) \, dx=\frac {\frac {\frac {2 \, {\left (\cos \left (b x + a\right ) - 1\right )}}{\cos \left (b x + a\right ) + 1} + \frac {3 \, {\left (\cos \left (b x + a\right ) - 1\right )}^{2}}{{\left (\cos \left (b x + a\right ) + 1\right )}^{2}} + 3}{{\left (\frac {\cos \left (b x + a\right ) - 1}{\cos \left (b x + a\right ) + 1} + 1\right )}^{2}} + \log \left (\frac {{\left | -\cos \left (b x + a\right ) + 1 \right |}}{{\left | \cos \left (b x + a\right ) + 1 \right |}}\right ) - 2 \, \log \left ({\left | -\frac {\cos \left (b x + a\right ) - 1}{\cos \left (b x + a\right ) + 1} - 1 \right |}\right )}{2 \, b} \]

[In]

integrate(sec(b*x+a)^3/sin(b*x+a),x, algorithm="giac")

[Out]

1/2*((2*(cos(b*x + a) - 1)/(cos(b*x + a) + 1) + 3*(cos(b*x + a) - 1)^2/(cos(b*x + a) + 1)^2 + 3)/((cos(b*x + a
) - 1)/(cos(b*x + a) + 1) + 1)^2 + log(abs(-cos(b*x + a) + 1)/abs(cos(b*x + a) + 1)) - 2*log(abs(-(cos(b*x + a
) - 1)/(cos(b*x + a) + 1) - 1)))/b

Mupad [B] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.30 \[ \int \csc (a+b x) \sec ^3(a+b x) \, dx=\frac {\frac {\ln \left ({\sin \left (a+b\,x\right )}^2\right )}{2}-\ln \left (\cos \left (a+b\,x\right )\right )+\frac {1}{2\,{\cos \left (a+b\,x\right )}^2}}{b} \]

[In]

int(1/(cos(a + b*x)^3*sin(a + b*x)),x)

[Out]

(log(sin(a + b*x)^2)/2 - log(cos(a + b*x)) + 1/(2*cos(a + b*x)^2))/b